package personal.jason.hmm;

import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.util.List;

/**
 * HMM by the most popular algorithm
 * 
 * 1. Algorithm:  Forward Algorithm / MLE / EM / Viterbi
 * 2. Model file: 
 *         |
 *         |-state_dic.txt            "number/word" size:n
 *         |-obervate_dic.txt         "number/word" size:m
 *         |-state_tran.txt           "probability probability...\n" n*n matrix
 *         |-state_overvate_tran.txt  "probability probability...\n" n*m matrix"
 * 3. Train set need:
 *         |
 *         |-observation/state observation/state.....
 * 
 * @author Jason wu
 *
 */

public class NormalHMM implements HMM{

	@Override
	public boolean loadModel(String modelPath) {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public boolean supervisedLearn(String trainfile, String outputPath) {
		// TODO Auto-generated method stub
		BufferedReader reader = null;
		try {
			reader = new BufferedReader(new FileReader(trainfile));
			String tempString = null;
			while ((tempString = reader.readLine()) != null) {
				
			}
			reader.close();
		} catch (FileNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return false;
	}

	@Override
	public boolean unSupervisedLearn(String trainfile, String outputPath) {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public double probability(String[] observation) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public List<String> decode(String[] observation) {
		// TODO Auto-generated method stub
		return null;
	}


}
